<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>添加或编辑界面</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/theme/theme.css"/>
    <style>
        .w440{
            width: 440px !important;
        }
    </style>
</head>
<body>
<div class="page-content-wrap clearfix">
    <form class="layui-form" id="tool">
        <div class="layui-tab">
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;姓名：</label>
                        <div class="layui-input-inline w440">
                            <input type="text" name="personIdName" value="${antiepidemicTemperatureVo.personIdName}" placeholder="请输入姓名" autocomplete="off" class="layui-input" readOnly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="red">*</span>&nbsp;日期：</label>
                        <div class="layui-input-inline w440">
                            <input type="text" name="recordTime" id="recordTime" value="<#if antiepidemicTemperatureVo.recordTime??><#if antiepidemicTemperatureVo.recordTime?is_date>${antiepidemicTemperatureVo.recordTime?string('yyyy-MM-dd')}<#elseif antiepidemicTemperatureVo.recordTime?is_string>${antiepidemicTemperatureVo.recordTime?substring(0,10)}</#if><#else>${antiepidemicTemperatureVo.recordTime}</#if>" lay-verify="required" placeholder="请输入日期" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;体温数值：</label>
                        <div class="layui-input-inline w440">
                            <input type="text" name="temperature" value="${antiepidemicTemperatureVo.temperature}" placeholder="请输入体温数值" autocomplete="off" class="layui-input" maxlength="200">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="red">*</span>&nbsp;体温状态：</label>
                        <div class="layui-input-inline w440">
                            <select name="temperatureStatus" id="temperatureStatus" lay-verify="required" ></select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block" style="margin-left: 0px !important;text-align: center">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="submitBtn">提交</button>
                <button type="button" id="cancel" class="layui-btn layui-btn-primary">取消</button>
                <button type="button" style="display: none;" id="save" class="layui-btn layui-btn-primary"></button>
            </div>
        </div>
    </form>
</div>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['jquery', 'form', 'page', 'laydate', 'baseutil'], function () {
        var $ = layui.jquery,
            form = layui.form,
            page = layui.page,
            laydate = layui.laydate,
            baseutil = layui.baseutil;

        //初始化时间控件
        laydate.render({elem: '#recordTime', type: 'date'});

        page.initDict('temperatureStatus', function (dictData) {
            page.showDict($("#temperatureStatus"), page.aceeptDictContentList(dictData, 'temperatureStatus'), "请选择", '${antiepidemicTemperatureVo.temperatureStatus}');
        });

        //监听提交
        form.on('submit(submitBtn)', function (data) {
            data.field.id = '${antiepidemicTemperatureVo.id}';
            baseutil.post("/work/antiepidemic/antiepidemictemperature/addOrUpdate", data.field, function () {
                $("#save").click();
            });
            return false;
        });
    });
</script>
</body>
</html>